package com.my.config.ds.datarouting;

import org.aspectj.lang.annotation.Aspect;
import org.springframework.aop.AfterReturningAdvice;
import org.springframework.aop.MethodBeforeAdvice;
import org.springframework.stereotype.Component;

import java.lang.reflect.Method;

@Aspect
@Component
public class DataSourceAspect implements MethodBeforeAdvice, AfterReturningAdvice {
    public DataSourceAspect() {
    }

    public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
        System.out.println("afterReturning===================");    }

    public void before(Method method, Object[] args, Object target) throws Throwable {
        System.out.println("before===================");

    }

}